package com.ocom.devicehttp.controller;


import com.ocom.common.constant.MachineHttpUrl;
import com.ocom.common.utils.JsonResponse;
import com.ocom.devicehttp.service.DishesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class DishesController {

    @Autowired
    DishesService  dishesService;



    @PostMapping(MachineHttpUrl.URL_orderMenuType)
    public JsonResponse orderMenuType(@RequestBody Map<String,Object> map) {
        JsonResponse jsonResponse=dishesService.orderMenuType(map);
        return jsonResponse;
    }


    @PostMapping(MachineHttpUrl.URL_orderMenuList)
    public JsonResponse orderMenuList(@RequestBody Map<String,Object> map) {
        JsonResponse jsonResponse=dishesService.orderMenuList(map);
        return jsonResponse;
    }



    @PostMapping(MachineHttpUrl.URL_menuListQuery)
    public JsonResponse menuListQuery(@RequestBody Map<String,Object> map) {
        JsonResponse jsonResponse=dishesService.menuListQuery(map);
        return jsonResponse;
    }


    @PostMapping(MachineHttpUrl.URL_informationQuery)
    public JsonResponse informationQuery(@RequestBody Map<String,Object> map) {
        JsonResponse jsonResponse=dishesService.informationQuery(map);
        return jsonResponse;
    }



    @PostMapping(MachineHttpUrl.URL_personQuery)
    public JsonResponse personQuery(@RequestBody Map<String,Object> map) {
        JsonResponse jsonResponse=dishesService.personQuery(map);
        return jsonResponse;
    }


    @PostMapping(MachineHttpUrl.URL_orderVerification)
    public JsonResponse orderVerification(@RequestBody Map<String,Object> map) {
        JsonResponse jsonResponse=dishesService.orderVerification(map);
        return jsonResponse;
    }


    @PostMapping(MachineHttpUrl.URL_adReceiptQuery)
    public JsonResponse adReceiptQuery(@RequestBody Map<String,Object> map) {
        JsonResponse jsonResponse=dishesService.adReceiptQuery(map);
        return jsonResponse;
    }


    @PostMapping(MachineHttpUrl.URL_orderPointQuery)
    public JsonResponse orderPointQuery(@RequestBody Map<String,Object> map) {
        JsonResponse jsonResponse=dishesService.orderPointQuery(map);
        return jsonResponse;
    }


    @PostMapping(MachineHttpUrl.URL_phoneInitPara)
    public JsonResponse phoneInitPara(@RequestBody Map<String,Object> map) {
        JsonResponse jsonResponse=dishesService.phoneInitPara(map);
        return jsonResponse;
    }

    @PostMapping(MachineHttpUrl.URL_ShareInitPara)
    public JsonResponse shareInitPara(@RequestBody Map<String,Object> map){
        return this.dishesService.ShareInitPara(map);
    }

    @PostMapping(MachineHttpUrl.URL_newMqttOrder)
    public JsonResponse newMqttOrder(@RequestBody Map<String,Object> map){
        return this.dishesService.newMqttOrder(map);
    }

    @PostMapping(MachineHttpUrl.URL_payMqttOrder)
    public JsonResponse payMqttOrder(@RequestBody Map<String,Object> map){
        return this.dishesService.payMqttOrder(map);
    }

    @PostMapping(MachineHttpUrl.URL_cancelMqttOrder)
    public JsonResponse cancelMqttOrder(@RequestBody Map<String,Object> map){
        return this.dishesService.cancelMqttOrder(map);
    }
}
